<?php if(!isset($_SESSION)) 
    { 
        session_start(); 
    } ?>
<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8" />
        <meta name="viewport" content="width=device-width; initial-scale=1.0">
        <title>Hoàng Xuân Hiếu</title>
        <link rel="stylesheet" href="<?=uriStatic('/css/style.css')?>" />
        <link rel="stylesheet" href="<?=uriStatic('/css/reponsive.css')?>" />
        <link rel="stylesheet" href="<?=uriStatic('/css/register.css')?>" />
        <link rel="stylesheet" href="<?=uriStatic('/css/user.css')?>" />
        <link rel="stylesheet" href="<?=uriStatic('/css/profile.css')?>" />
        <link rel="stylesheet" href="<?=uriStatic('/css/news.css')?>" />
        <script src=<?= uriStatic('/js/jquery.js')?>></script>
        <script src=<?= uriStatic('/js/jquery.validate.min.js')?>></script>
        <script src=<?= uriStatic('/js/messages_vi.js')?>></script>
    </head>
    <body>
        <div id="wrap">
            <header>
                <div class="logo">
                </div>


                  <nav>
                <div class="menu bgcolor-violet">
                    <a href="#">
                        <img src="http://localhost/project/view/index/widget/css/images/home.png" />
                        <span>
                            Trang chủ
                        </span>
                    </a>
                </div>
                <div class="menu bgcolor-red">
                    <a href="#">
                        <img src="http://localhost/project/view/index/widget/css/images/infomation.png" />
                        <span>
                            Giới thiệu
                        </span>
                    </a>
                </div>
                <div class="menu bgcolor-green">
                    <a href="#">
                        <img src="http://localhost/project/view/index/widget/css/images/people2.png" />
                        <span>
                            Gia sư
                        </span>
                    </a>
                </div>
                <div class="menu bgcolor-cyan">
                    <a href="#">
                        <img src="http://localhost/project/view/index/widget/css/images/tip.png" />
                        <span>
                            Đào tạo
                        </span>
                    </a>
                </div>
                <div class="menu bgcolor-blue">
                    <a href="#">
                        <img src="http://localhost/project/view/index/widget/css/images/support.png" />
                        <span>
                            Hỗ trợ
                        </span>
                    </a>
                </div>
                <div class="menu bgcolor-yellow">
                    <a href="#">
                        <img src="http://localhost/project/view/index/widget/css/images/call.png" />
                            <span>
                                Liên hệ
                            </span>
                    </a>
                </div>
                <!-- 
                    Nếu đã đăng nhập rồi thỳ hiển thị UserCP còn nếu chưa đăng nhập thỳ hiển thị đăng ký 
                -->
                <?php
                    if(isset($_SESSION['username']) && $_SESSION['level'] == 0)
                    {
                ?>
                    <div class="menu bgcolor-prune">
                        <a class="btnRegister">
                            <img src="http://localhost/project/view/index/widget/css/images/login.png" />
                                <span>
                                    UserCP
                                </span>
                        </a>
                    </div>
                <?php
                }
                else {
                    ?>
                        <div class="menu bgcolor-prune">
                        <a class="btnRegister">
                            <img src="http://localhost/project/view/index/widget/css/images/login.png" />
                                <span>
                                    Login/Register
                                </span>
                        </a>
                    </div>
                    <?php
                }
                ?>
                
            </nav>
            <div style="clear: both"></div>
            </header>
        </div>
            
            <div class="clear"></div>